package parder

import (
	"parser/engine"
	"regexp"
)

const cityRe = `<a href="(http://album.zhenai.com/u/[0-9]+)"[^>]*>([^<]*)</a>`
func ParseCity(content []byte) engine.ParserResult {
	re:=regexp.MustCompile(cityRe)
	matches := re.FindAllSubmatch(content,-1)
	result :=engine.ParserResult{}
	for _, value := range matches {
		result.Items  = append(result.Items,"User" + string(value[2]))
		result.Requests  = append(result.Requests,engine.Request{Url: string(value[1]),ParserFunc:nilfun } )
	}
	return result
}


func nilfun(content []byte) engine.ParserResult {
	result :=engine.ParserResult{}
	return result
}

